//
//  sprite.h
//  gles1
//
//  Created by Realore Realore on 27.09.11.
//  Copyright 2011 Realore Studios. All rights reserved.
//

#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import "texture.h"
#import "timer.h"


class TEngine: public CTimerCallbackInterface
{
private:
    int x;
    int y;
    /*
    int width,height;
    //texture coordinates
    float u1,v1,u2,v2;
    //rotation
    int rotation;
    //frames
    int totalFrames,currFrame;
    float frameSizeU,frameSizeV;
    //
    GLuint* Textures;
     */
    CTimer* m_pTimer;
public:
    TEngine(int delay,void (*f)());
    typedef void (*functiontype)();
    functiontype func;
    //TEngine(){};
    /*
    void InitTexture(char filename[]);
    void UpdateAnim();
    void InitTexture(Texture& tex);
    
    void SetFrame(int frame);
    void SetTextureCoords(float _u1,float _v1,float _u2,float _v2);
    void SetPolygon(float _width,float _height);
    
    void Draw();
    
    Texture spriteTexture;
    
    int TextureID;
    GLfloat squareVert[8];    
    GLfloat texCoord[8];
    
    void startTest();
     */
    
    void onTimer(const CTimer* timer);
};
